package com.jaks.xpense.data.entities;

import android.content.ContentValues;

public class Expense extends TableEntity {

	public static final String TableName = "expenses";
	public static final String ExpenseDate = "expensedate";
	public static final String PaymentType = "paymenttype";
	public static final String Amount = "amount";
	public static final String Comments = "comments";

	private String expenseDate;
	private long paymentType;
	private double amount;
	private String comments;

	public Expense() {
		super();
	}

	public Expense(String expenseDate, long paymentType, double amount, String comments) {
		this(0, expenseDate, paymentType, amount, comments);
	}

	public Expense(long id, String expenseDate, long paymentType, double amount, String comments) {
		this.id = id;
		this.expenseDate = expenseDate;
		this.paymentType = paymentType;
		this.amount = amount;
		this.comments = comments;
	}

	public String getExpenseDate() {
		return expenseDate;
	}

	public void setExpenseDate(String expenseDate) {
		this.expenseDate = expenseDate;
	}

	public long getPaymentType() {
		return paymentType;
	}

	public void setPaymentType(long paymentType) {
		this.paymentType = paymentType;
	}

	public double getAmount() {
		return amount;
	}

	public void setAmount(double amount) {
		this.amount = amount;
	}

	public String getComments() {
		return comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	@Override
	public ContentValues getContentValues() {

		ContentValues values = new ContentValues();
		values.put(ExpenseDate, expenseDate.trim());
		values.put(PaymentType, paymentType);
		values.put(Amount, amount);
		values.put(Comments, comments.trim());
		return values;
	}
}
